package com.huaxindata.im.model.contact;

import android.os.Parcel;
import android.os.Parcelable;

import com.baidu.mapapi.model.LatLng;

/**
 * 联系人中的好友对象(个人)
 */
public class ContactPerson extends Contact implements Parcelable {

    private String title;//头衔，如技术工程师
    private LatLng mLatLng;//百度地理位置坐标

    public LatLng getLatLng() {
        return mLatLng;
    }

    public void setLatLng(LatLng latLng) {
        mLatLng = latLng;
    }

    public ContactPerson() {
    }

    public ContactPerson(String clientId, String nickName, String icon) {
        this.clientId = clientId;
        this.nickName = nickName;
        this.icon = icon;
    }

    public ContactPerson(String clientId, String icon, String nickName, String phone, String duty, String company) {
        this.clientId = clientId;
        this.icon = icon;
        this.nickName = nickName;
        this.phone = phone;
        this.duty = duty;
        this.company = company;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public void setTitle(String title) {
        this.title = title;
        this.duty = title;
    }

    protected ContactPerson(Parcel in) {
        clientId = in.readString();
        icon = in.readString();
        nickName = in.readString();
        title = in.readString();
        duty = in.readString();
        phone = in.readString();
        company = in.readString();
    }

    public static final Parcelable.Creator<ContactPerson> CREATOR = new Parcelable.Creator<ContactPerson>() {
        @Override
        public ContactPerson createFromParcel(Parcel in) {
            return new ContactPerson(in);
        }

        @Override
        public ContactPerson[] newArray(int size) {
            return new ContactPerson[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(clientId);
        dest.writeString(icon);
        dest.writeString(nickName);
        dest.writeString(title);
        dest.writeString(duty);
        dest.writeString(phone);
        dest.writeString(company);
    }
}
